<template>
  <Tree :data></Tree>
</template>

<script setup lang="ts">
import { ref } from "vue";
import Tree from "./Tree.vue";

interface ITree {
  name: string;
  checked: boolean;
  children?: ITree[];
}

const data = ref<ITree[]>([
  {
    name: "1",
    checked: false,
    children: [
      { name: "1-1", checked: false },
      { name: "1-2", checked: false },
    ],
  },
  {
    name: "2",
    checked: false,
  },
  {
    name: "3",
    checked: false,
    children: [
      { name: "3-1", checked: false },
      {
        name: "3-2",
        checked: false,
        children: [
          {
            name: "3-2-1",
            checked: false,
          },
          {
            name: "3-2-2",
            checked: false,
          },
        ],
      },
    ],
  },
]);
</script>
